package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DeclarationJTReportMapper;
import com.ruoyi.system.domain.DeclarationJTReport;
import com.ruoyi.system.service.IDeclarationJTReportService;
import com.ruoyi.common.core.text.Convert;

/**
 * 军团报表Service业务层处理
 * 
 * @author triangle
 * @date 2022-08-13
 */
@Service
public class DeclarationJTReportServiceImpl implements IDeclarationJTReportService 
{
    @Autowired
    private DeclarationJTReportMapper declarationJTReportMapper;

    /**
     * 查询军团报表
     * 
     * @param decId 军团报表主键
     * @return 军团报表
     */
    @Override
    public DeclarationJTReport selectDeclarationJTReportByDecId(Long decId)
    {
        return declarationJTReportMapper.selectDeclarationJTReportByDecId(decId);
    }

    /**
     * 查询军团报表列表
     * 
     * @param declarationJTReport 军团报表
     * @return 军团报表
     */
    @Override
    public List<DeclarationJTReport> selectDeclarationJTReportList(DeclarationJTReport declarationJTReport)
    {
        return declarationJTReportMapper.selectDeclarationJTReportList(declarationJTReport);
    }

    /**
     * 新增军团报表
     * 
     * @param declarationJTReport 军团报表
     * @return 结果
     */
    @Override
    public int insertDeclarationJTReport(DeclarationJTReport declarationJTReport)
    {
        declarationJTReport.setCreateTime(DateUtils.getNowDate());
        return declarationJTReportMapper.insertDeclarationJTReport(declarationJTReport);
    }

    /**
     * 修改军团报表
     * 
     * @param declarationJTReport 军团报表
     * @return 结果
     */
    @Override
    public int updateDeclarationJTReport(DeclarationJTReport declarationJTReport)
    {
        declarationJTReport.setUpdateTime(DateUtils.getNowDate());
        return declarationJTReportMapper.updateDeclarationJTReport(declarationJTReport);
    }

    /**
     * 批量删除军团报表
     * 
     * @param decIds 需要删除的军团报表主键
     * @return 结果
     */
    @Override
    public int deleteDeclarationJTReportByDecIds(String decIds)
    {
        return declarationJTReportMapper.deleteDeclarationJTReportByDecIds(Convert.toStrArray(decIds));
    }

    /**
     * 删除军团报表信息
     * 
     * @param decId 军团报表主键
     * @return 结果
     */
    @Override
    public int deleteDeclarationJTReportByDecId(Long decId)
    {
        return declarationJTReportMapper.deleteDeclarationJTReportByDecId(decId);
    }
}
